Tutorials for Spheres: spheres.c3d

In this section you will learn about translations.


Object:

A: Sphere01
B: Box01
C: Sphere02

What we will do is to make Sphere01 bounce against Box01.



For starters, place Sphere01 into the Event map, (fig1 step 1) you will find it under the Scenegraph menu under RootNode. Grab and drop Sphere01 to Event map. In the Event map window there will appear an icon named Sphere01. In the left window you will find a mouse-icon named "Left mouse click on object," (fig1 step 2) grab and drop that one onto your Event map.You should now have two icons in your Event map window named:

Sphere01
Event_1



Grab and drop Sphere01 onto Event_1, (fig1 step 3) a line will form a link between the two icons binding them together. The link can be followed by clicking one of the icons, the line/lines will be highlighted in green so that you easily can find what icon is linked to what.



In the window Actions, you will find a large variety of names with plus in front of them, find Object motion and click the plus. Grab and drop Sequence actions (fig1 step 4) onto the icon Event_1 on your Event map.

A Sequence action button is a type of switchbox, which makes it possible to choose in which order motions and/or rotations will start.




Under Object motion you will find Translation, (fig1 step 5) grab and drag it to Sequence action, after doing that link Sphere01 to Translation, another line, marking the connection between them both will appear.

Double click on translation, the window Translation action details should pop up. In this window you can choose in which direction to move the sphere. Move X axis to 60 and you'll see the purple sphere moving toward the box in the action window

Add another Translation to the Sequence actionbutton and link it to Sphere01. Double-click on the new Translation and move the X axis to -60.

Start the animation by choosing run under Preview on the statusbar. If you then move the mousearrow over the purple sphere you will see that it changes into the letter E, that means there are some sort of animation to the object. If you now try clicking on it the animation will play, although not in the direction we intended it to move. The reason it moves in the wrong direction is that we haven't given the two translations any priorityorder, it simply skips the second one. Stop the animation. Double-click on Sequence Action on the event map and another window named Sequence action details will open. In the window you will find the two Translations, mark the first from the top by clicking on it.

We will now block it by clicking the white square, simply named blocking.

A "B" will appear to show that it has been blocked, close the window and play the animation again to see that it acutely works as it should.

Try experimenting with speed in the animation, double-click on one of the two translations, as you see the performance duration is at 1000, if you change it to 500 the animation will play twice as fast.

Why not try to make the green sphere bounce against the box.

<< BACK